import { lazy } from "react"

export let mainRouter = [
    {
        path:"/index/home",
        element:lazy(()=>import("../page/Index/Home/Index")),
        icon:"WapHomeO",
        title:"首页"
    },
    {
        path:"/index/city",
        element:lazy(()=>import("../page/Index/City/Index")),
        icon:"LocationO",
        title:"北京"
    },
    {
        path:"/index/message",
        element:lazy(()=>import("../page/Index/Message/Index")),
        icon:"CommentO",
        title:"消息"
    },
    {
        path:"/index/as_ba_ba",
        element:lazy(()=>import("../page/Index/As_ba_ba/Index")),
        icon:"Circle",
        title:"职帮帮"
    },
    {
        path:"/index/my",
        element:lazy(()=>import("../page/Index/My/Index")),
        icon:"FireO",
        title:"我的"
    },
]

const routes = [
    {
        from:"/",
        to:"/index/home"
    },
    {
        path:"/index",
        element:lazy(()=>import("../page/Index/Index")),
        children:mainRouter
    },
    {
        path:"/detail/:id",
        element:lazy(()=>import("../page/Detali/Index"))
    },
    {
        path:"/login",
        element:lazy(()=>import("../page/Login/Login"))
    },
    {
        path:"*",
        element:lazy(()=>import("../page/Eorry404/Index"))
    }
]

export default routes